fix(wis): remove redundant agent handoff workflow - #770
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThis PR removes the redundant ChangesWorkflow Pattern Refinement and Test Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📊 Coverage ReportCoverage report not available
Generated by PR Automation (Story 6.1) |
There was a problem hiding this comment.
🧹 Nitpick comments (3)
.aiox-core/workflow-intelligence/__tests__/integration.test.js (1)
8-8: 💤 Low valueRelative import violates coding guidelines.
Line 8 uses a relative import path (
'../index'). As per coding guidelines, absolute imports should be used instead of relative imports in all code.Consider refactoring to absolute import
-const wis = require('../index'); +const wis = require('.aiox-core/workflow-intelligence/index');🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.aiox-core/workflow-intelligence/__tests__/integration.test.js at line 8, Replace the relative require('../index') in the test (the line that assigns to variable wis) with an absolute module import of the workflow-intelligence package/module (use the package name or its published path instead of ../index), update any package.json exports if necessary so the absolute import resolves, and run the tests to confirm the change..aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js (1)
9-13: 💤 Low valueRelative import violates coding guidelines.
The require statement on line 13 uses a relative path (
'../registry/workflow-registry'). As per coding guidelines, absolute imports should be used instead of relative imports in all code.While relative imports are common in test files, the guideline applies to
**/*.{js,jsx,ts,tsx}without exceptions.Consider refactoring to absolute import
-const { - WorkflowRegistry, - createWorkflowRegistry, - DEFAULT_CACHE_TTL, -} = require('../registry/workflow-registry'); +const { + WorkflowRegistry, + createWorkflowRegistry, + DEFAULT_CACHE_TTL, +} = require('.aiox-core/workflow-intelligence/registry/workflow-registry');🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js around lines 9 - 13, The test uses a relative require for the exports WorkflowRegistry, createWorkflowRegistry, and DEFAULT_CACHE_TTL; replace the relative import ('../registry/workflow-registry') with the project's absolute module import (use the repository/module root alias) so the test requires the module via its absolute path (importing WorkflowRegistry, createWorkflowRegistry, DEFAULT_CACHE_TTL) rather than a relative ../ path to comply with the coding guideline.tests/core/workflow-navigator-integration.test.js (1)
22-76: 💤 Low valueMultiple relative imports in jest.mock() calls violate coding guidelines.
Lines 22-76 contain numerous
jest.mock()calls with relative paths (e.g.,'../../.aiox-core/core/session/context-detector'). As per coding guidelines, absolute imports should be used instead of relative imports in all code.Note: In Jest test files, relative paths in
jest.mock()are standard practice for mocking adjacent modules.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/core/workflow-navigator-integration.test.js` around lines 22 - 76, Replace the relative module paths used in the jest.mock() calls with the project's approved absolute import aliases so the mocks follow coding guidelines; update each mocked module reference (context-detector, git-config-detector, project-status-loader, config-resolver, greeting-preference-manager, permissions, session-state, surface-checker) to use the configured absolute import (e.g., the project's module alias or package name) in the jest.mock(...) calls and keep the mock implementations unchanged (ensure names like loadProjectStatus, resolveConfig, PermissionMode, SessionState, SurfaceChecker remain targeted the same way).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.aiox-core/workflow-intelligence/__tests__/integration.test.js:
- Line 8: Replace the relative require('../index') in the test (the line that
assigns to variable wis) with an absolute module import of the
workflow-intelligence package/module (use the package name or its published path
instead of ../index), update any package.json exports if necessary so the
absolute import resolves, and run the tests to confirm the change.
In @.aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js:
- Around line 9-13: The test uses a relative require for the exports
WorkflowRegistry, createWorkflowRegistry, and DEFAULT_CACHE_TTL; replace the
relative import ('../registry/workflow-registry') with the project's absolute
module import (use the repository/module root alias) so the test requires the
module via its absolute path (importing WorkflowRegistry,
createWorkflowRegistry, DEFAULT_CACHE_TTL) rather than a relative ../ path to
comply with the coding guideline.
In `@tests/core/workflow-navigator-integration.test.js`:
- Around line 22-76: Replace the relative module paths used in the jest.mock()
calls with the project's approved absolute import aliases so the mocks follow
coding guidelines; update each mocked module reference (context-detector,
git-config-detector, project-status-loader, config-resolver,
greeting-preference-manager, permissions, session-state, surface-checker) to use
the configured absolute import (e.g., the project's module alias or package
name) in the jest.mock(...) calls and keep the mock implementations unchanged
(ensure names like loadProjectStatus, resolveConfig, PermissionMode,
SessionState, SurfaceChecker remain targeted the same way).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 900b40cf-947d-42d5-a079-002794f2c6d3
📒 Files selected for processing (7)
.aiox-core/data/entity-registry.yaml.aiox-core/data/workflow-patterns.yaml.aiox-core/install-manifest.yaml.aiox-core/workflow-intelligence/__tests__/integration.test.js.aiox-core/workflow-intelligence/__tests__/workflow-registry.test.jsjest.config.jstests/core/workflow-navigator-integration.test.js
💤 Files with no reviewable changes (1)
- jest.config.js
Summary
agent_handoffworkflow from.aiox-core/data/workflow-patterns.yaml.story_developmentsofix-qa-issuesandrun-testsremain discoverable without a duplicate workflow.bob_orchestration, with noagent_handoff.Fixes #766.
Validation
npx yaml-lint .aiox-core/data/workflow-patterns.yamlnpm test -- .aiox-core/workflow-intelligence/__tests__/integration.test.js .aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js tests/core/workflow-navigator-integration.test.js --runInBand(3 suites, 136 tests)npm test -- .aiox-core/workflow-intelligence/__tests__ tests/integration/workflow-intelligence tests/unit/workflow-intelligence --runInBand(11 suites, 370 tests)npm run lintnpm run typechecknpm run test:ci -- --silent(350 suites passed, 8717 tests passed, 12 suites skipped)npm run validate:manifestSummary by CodeRabbit
New Features
Tests